package com.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.model.ReponseDto;
import com.model.Statistics;
import com.service.IHomeService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping(value = "/home")
@Api(tags = "主页", value = "主页api")
public class HomeController {

    @Autowired
    private IHomeService homeService;

    @RequestMapping(value = "/index")
    @ApiOperation(value = "主页")
    @ApiImplicitParams({})
    public ReponseDto<Statistics> index(Model model, HttpServletRequest request) {
        return homeService.index();
    }
}
